<template>
    <div>
        <!-- 
            el-upload 上传图片
                action 必选参数，上传的地址 string



         -->
        <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card"
            :on-preview="handlePictureCardPreview" :on-remove="handleRemove" multiple>
            <i class="el-icon-plus"></i>
        </el-upload>
    </div>
</template>

<script>
export default {
    data() {
        return {
            // dialogImageUrl: '',
            // dialogVisible: false
        };
    },
    methods: {
        handleRemove(file, fileList) {
            console.log(file, fileList);
        },
        handlePictureCardPreview(file) {
            this.dialogImageUrl = file.url;
            this.dialogVisible = true;
        }
    }
}
</script>

<style></style>